#include "OrderProduct.h"
#include <iomanip>
OrderProduct::OrderProduct() {

}

OrderProduct::OrderProduct(Products* product, int quantity, double amount) {
	this->product = product;
	this->quantity = quantity;
	this->amount = amount;
}

Products* OrderProduct::getProduct() {
	return this->product;
}

void OrderProduct::setProduct(Products* product) {
	this->product = product;
}

int OrderProduct::getQuantity() {
	return this->quantity;
}

void OrderProduct::setQuantity(int quantity) {
	this->quantity = quantity;
}

double OrderProduct::getAmount() {
	return this->amount;
}

void OrderProduct::setAmount(double amount) {
	this->amount = amount;
}

void  OrderProduct::OrderProductInfo()
{
	cout << "|"<< setw(10) <<  getProduct()->getPid() << "|" <<setw(10) << getProduct()->getBrand() << "|" <<setw(10) <<  getProduct()->getPrice() << "|" <<setw(10) <<  getQuantity() <<"|"<<setw(10) << (getProduct()->getPrice() * getQuantity());

}
